package cn.appsys.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.appsys.biz.AppVersionBiz;
import cn.appsys.dao.AppVersionDao;
import cn.appsys.pojo.AppInfo;
import cn.appsys.pojo.AppVersion;

@Service("appVersionBiz")
public class AppVersionBizImpl implements AppVersionBiz {
	@Autowired
	private AppVersionDao appVersionDao;

	public List<AppVersion> getAppVersion() {

		return appVersionDao.getAppVersion();
	}

	public List<AppVersion> getByAppId(int appId) {
		return appVersionDao.getByAppId(appId);
	}

	public int deleteVersion(int appId) {
		return appVersionDao.deleteVersion(appId);
	}

	public int updateVersion(AppVersion appVersion) {
		return appVersionDao.updateVersion(appVersion);
		
	}
	public int addVersion(AppVersion appVersion) {
		
		return appVersionDao.addVersion(appVersion);
	}
	@Transactional(propagation = Propagation.REQUIRED)
	public int updates(AppInfo AppInfo) {
	
		return appVersionDao.updates(AppInfo);
	}

}
